<?php
$mod_url	= $baseUrlSave."siswa/manual/download_materi_sub_siswa/";
if($mode=="dosen")
{
	if(is_array($dosen))
	{
		echo "<table class='table' width='80%'>";
		echo "<tr><th colspan='2'><b>Daftar dosen</b></th></tr>";
		for($i=0; $i<count($dosen) ; $i=$i+2)
		{
			echo "<tr>";
				echo "<td>";
					echo	"<a href='$mod_url".$dosen[$i]['kode_dosen']."'>"
					.$dosen[$i]['nama']
					."</a>";
				echo "</td>";
				echo "<td>";
					if(isset($dosen[$i+1]))
						echo	"<a href='$mod_url".$dosen[$i+1]['kode_dosen']."'>"
						.$dosen[$i+1]['nama']
						."</a>";
				echo "</td>";
			echo "</tr>";
		}
		echo "</table>";
	}
}
else
{
	if(is_array($materi))
	{
		echo "<table class='table' width='80%'>";
		echo "<tr><th colspan='6'><b>Daftar File Materi</b></th></tr>";
		echo "<tr>
				<th>No</th>
				<th>Jurusan</th>
				<th>Mata Pelajaran</th>
				<th>Nama File</th>
				<th>Keterangan</th>
				<th>Download</th>
				</tr>";
		for($i=0; $i<count($materi) ; $i++)
		{
			echo "<tr>";
				echo "<td>".($i+1)."</td>";
				echo "<td>".$materi[$i]['nama_jurusan']."</td>";
				echo "<td>".$materi[$i]['mata_kuliah']."</td>";
				echo "<td>".$materi[$i]['judul']."</td>";
				echo "<td>".$materi[$i]['keterangan']."</td>";
				echo "<td>";
					if($materi[$i]['file_upload']!='')
					echo	"<a href='".$materi[$i]['file_upload']."'>[Download]</a>";
				echo "</td>";
			echo "</tr>";
		}
		echo "<tr><th colspan='6'>
			<a href='$mod_url'>
			<b>Daftar dosen</b>
			</a>
			</th></tr>";
		echo "</table>";
	}
}
?>